package com.wkhyapp.lm.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wkhyapp.lm.R;
import com.wkhyapp.lm.http.vo.Market;
import com.wkhyapp.lm.utils.ImageLoadUtil;
import com.wkhyapp.lm.weigit.discussionavatarview.DiscussionAvatarView;

import java.util.List;

/**
 * Created by fang on 2021/10/20.
 */

public class MarketaAdapter extends BaseQuickAdapter<Market, BaseViewHolder> {


    public MarketaAdapter(int layoutResId, List<Market> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, Market item) {
        DiscussionAvatarView discussionAvatarView  = helper.getView(R.id.daview);
        discussionAvatarView.initDatas(item.getMemberVos());
        ImageView img_iv = helper.getView(R.id.img_iv);
        ImageLoadUtil.setImage_Normal(mContext,item.getImg(),img_iv);
        helper.setText(R.id.name_tv,item.getName()+"");
        helper.setText(R.id.address_tv,item.getAddress()+"");
        helper.setText(R.id.nums_tv,"入驻 "+item.getNums() +"人");

    }
}
